﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class D03_Time3 : MonoBehaviour
{
    public Transform cube, cube1;

    //物理交互会抖动
    private void Update()
    {
        cube.transform.Translate(Vector3.forward * Time.deltaTime * 5f);
    }

    //物理更新的间隔时间,可以在ProtectSettings中修改,默认是0.02秒
    private void FixedUpdate()//不抖
    {
        //print(Time.fixedDeltaTime);
        cube1.transform.Translate(Vector3.forward * Time.fixedDeltaTime * 5f);
    }
}